﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using NLBS.Entity;
using NLBS.Framework;

namespace NLBS
{
    public class BasePage:Page
    {
       public void ClearContent()
       {
           ContentPlaceHolder.Controls.Clear();
       }

        public User CurrentUser
        {
            get
            {
                return BlogInfo.Instance().CurrentUser;
            }
        }

        public System.Web.UI.Control ContentPlaceHolder
        {
            get
            {
                return base.Master.FindControl("ContentPlaceHolder");
            }
        }

        public void AddNewControlInContent(System.Web.UI.Control control)
        {
            ClearContent();
            ContentPlaceHolder.Controls.Add(control);
        }
    }
}
